/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package edu.ccut.titan.component;

import java.util.List;

/**
 * Record Node information define in logic component or action component file
 * 
 * <p>
 * Node Type include:
 * <li>1. Start Node
 * <li>2. End Node
 * <li>3. Component Node
 * <li>4. Logic Node
 * <li>5. view Node
 * <li>6. .. TODO:need more a. "if" Node for supporting branch; TODO: b. "Start
 * Iterator" Node and "End Iterator" Node for supporting Iterator; TODO: c.
 * "Start Transaction" Node, "End Transaction" Node, "Commit Transaction" Node
 * and "Rollback Transaction" Node for supporting transaction; TODO: d.
 * "sub-Logic" Node for supporting sub logic. TODO: e. "sub-action" Node for
 * supporting sub action.
 * 
 * @author LeslieGu
 * 
 * @see ILogicComponentInfo
 * @see IActionComponentInfo
 */
public interface INodeInfo {

	/**
	 * Get node id
	 * 
	 * @return
	 */
	public String getId();

	/**
	 * Get node name
	 * 
	 * @return
	 */
	public String getName();

	/**
	 * Get node description
	 * 
	 * @return
	 */
	public String getDescription();

	/**
	 * Get node {@link IParameterInfo} List
	 * 
	 * @return
	 */
	public List<IParameterInfo> getParameterInfos();

	/**
	 * Get next node id
	 * 
	 * @return
	 */
	public String getNextId();

	/**
	 * Execute node, different node should override this method to execute
	 * different logic
	 * 
	 * @param context
	 * @throws TitanComponentException
	 */
	public void execute(ILogicContext logicContext) throws Exception;
}
